home *** CD-ROM | disk | FTP | other *** search
/ HaCKeRz Kr0nlcKLeZ 1 / HaCKeRz Kr0nlcKLeZ.iso / chibacity / gbbdisk.arj / GENETIC / NEXTGEN.PAS < prev   
Encoding:
Pascal/Delphi Source File  |  1995-07-11  |  953 b   |  44 lines

  1. program nextgen; {Generate batch file to create 10000 hosts and infect them}
  2.  
  3. uses crt;
  4.  
  5. var
  6.   s,n,m:string;
  7.   bf:text;
  8.   j:word;
  9.   FileCnt:word;
  10.  
  11. begin
  12.   Randomize;
  13.   if ParamCount=1 then
  14.     begin
  15.       val(Paramstr(1),FileCnt,j);
  16.     end
  17.   else
  18.     begin
  19.       writeln('Please specify previous generation file count.');
  20.       halt(1);
  21.     end;
  22.   assign(bf,'next.bat');
  23.   rewrite(bf);
  24.   writeln(bf,'cd 1000');
  25.   for j:=1 to 2000 do
  26.     begin
  27.       str(j,n);
  28.       while length(n)<5 do n:='0'+n;
  29.       writeln(bf,'copy ..\test.com ',n,'.com');
  30.     end;
  31.   for j:=2 to 2001 do
  32.     begin
  33.       str(j-1,n);
  34.       str(random(FileCnt)+1,m);
  35.       while length(n)<5 do n:='0'+n;
  36.       while length(m)<8 do m:='0'+m;
  37.       writeln(bf,'prevgen\',m);
  38.       writeln(bf,'copy ',n,'.com inf');
  39.       writeln(bf,'del ',n,'.com');
  40.     end;
  41.   writeln(bf,'copy 02000.com inf');
  42.   writeln(bf,'del 02000.com');
  43.   close(bf);
  44. end.